package create.abstractfactory.abstract_factory_demo1;

/**
 * @author yeyangtao
 * @date 2020/5/20 17:27
 */
public class FactoryProduce {
    public static AbstractFactory getFactory(String factory) {
        switch (factory) {
            case "color":
                return new ColorFactory();
            case "shape":
                return new ShapeFactory();
            default:
                return null;
        }
    }
}
